﻿@using Nop.Plugin.Pricing.PreciousMetals
@using Nop.Web.Framework
@{
    Layout = "~/Administration/Views/Shared/_AdminLayout.cshtml";
}
@model Nop.Plugin.Pricing.PreciousMetals.Models.PreciousMetalsGroupModel
@using (Html.BeginForm("BulkEdit", "Plugins/PreciousMetals/Admin"))
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Administration/Content/images/ico-catalog.png")" alt="" />
            @T("Admin.Catalog.Products.PreciousMetalPricing.BulkEdit")
        </div>
        <div class="options">
            <button type="submit" name="save" value="save" class="t-button">@T("Admin.Common.Save")</button>
            <a href="@Url.Action("List", "Plugins/PreciousMetals/Admin")" class="t-button">@T("Admin.Catalog.PreciousMetal.ListEdit")</a>
        </div>
    </div>    
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CategoryId):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.CategoryId, Model.AvailableCategories)
                @Html.ValidationMessageFor(model => model.CategoryId)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <br/>
                <strong>@T("Admin.Catalog.Product.SelectOverrideToEdit")</strong><br/>
                <br/>
            </td>
        </tr>
        <tr id="pnlPreciousMetalsMetalType">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MetalType):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideMetalType)
                @Html.DropDownListFor(model => model.MetalType, ((PreciousMetalType)Model.MetalType).ToSelectList())
                @Html.ValidationMessageFor(model => model.MetalType)
            </td>
        </tr>
        <tr id="pnlPreciousTierPriceType">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.TierPriceType):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideTierPriceType)
                @Html.DropDownListFor(model => model.TierPriceType, ((PreciousMetalsTierPriceType)Model.TierPriceType).ToSelectList())
                @Html.ValidationMessageFor(model => model.TierPriceType)
            </td>
        </tr>
        <tr id="pnlPreciousMetalsQuoteType">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.QuoteType):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideQuoteType)
                @Html.DropDownListFor(model => model.QuoteType, ((PreciousMetalsQuoteType)Model.QuoteType).ToSelectList())
                @Html.ValidationMessageFor(model => model.QuoteType)
            </td>
        </tr>
        <tr id="pnlPreciousMetalsLowerAmount">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.LowerAmount):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideLowerAmount)
                @Html.EditorFor(model => model.LowerAmount) [@Model.BaseCurrencyIn]
                @Html.ValidationMessageFor(model => model.LowerAmount)
            </td>
        </tr>
        <tr id="pnlPreciousMetalsWeight">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.Weight):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideWeight)
                @Html.EditorFor(model => model.Weight)
                @Html.ValidationMessageFor(model => model.Weight)
            </td>
        </tr>
        <tr id="pnlTaxCategory">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.WeightId):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideWeightUnit)
                @Html.DropDownListFor(model => model.WeightId, Model.AvailableWeights)
                @Html.ValidationMessageFor(model => model.WeightId)
            </td>
        </tr>
        <tr id="pnlPreciousMetalsMathType">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MathType):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideMathType)
                @Html.DropDownListFor(model => model.MathType, ((PreciousPriceCalculationType)Model.MathType).ToSelectList())
                @Html.ValidationMessageFor(model => model.MathType)
            </td>
        </tr>
        <tr id="pnlPreciousMetalsPercentMarkup">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.PercentMarkup):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverridePercentMarkup)
                @Html.EditorFor(model => model.PercentMarkup) %
                @Html.ValidationMessageFor(model => model.PercentMarkup)
            </td>
        </tr>
        <tr id="pnlPreciousMetalsFlatMarkup">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.FlatMarkup):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverrideFlatMarkup)
                @Html.EditorFor(model => model.FlatMarkup) [@Model.BaseCurrencyIn]
                @Html.ValidationMessageFor(model => model.FlatMarkup)
            </td>
        </tr>


        <tr id="pnlPreciousMetalsPriceRoundingType">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.PriceRoundingType):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverridePriceRoundingType)
                @Html.DropDownListFor(model => model.PriceRoundingType, ((PriceRoundingType)Model.PriceRoundingType).ToSelectList())
                @Html.ValidationMessageFor(model => model.PriceRoundingType)
            </td>
        </tr>

        
        <tr id="pnlPreciousMetalsPriceRounding">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.PriceRounding):
            </td>
            <td class="adminData">
                @Html.CheckBoxFor(model => model.OverridePriceRounding)
                @Html.EditorFor(model => model.PriceRounding)
                @Html.ValidationMessageFor(model => model.PriceRounding)
            </td>
        </tr>
    </table>
       
}